﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace DBContext
{
    public interface IModelDAL
    {
        T GetModel<T>(Expression<Func<T, bool>> exp) where T : class, new();

        List<T> GetModelList<T>(Expression<Func<T, bool>> exp) where T : class, new();

        bool AddModel<T>(T model) where T : class, new();

        bool AddModels<T>(List<T> models) where T : class, new();

        bool DeleteModel<T>(Expression<Func<T, bool>> exp) where T : class, new();

        bool UpdateModel<T>(Expression<Func<T, bool>> exp, Expression<Func<T, T>> exp2) where T : class, new();

        bool UpdateModelSuper<T>(Expression<Func<T, bool>> exp, T t) where T : class, new();

        bool CheckExist<T>(Expression<Func<T, bool>> exp) where T : class, new();
    }
}